#include<func.h>
void * sigfunc(void* p)
{
    printf("I am child thread %ld\n",(long)p);

}
int main()
{
    pthread_t pthid[2];
    int ret;
    
    for(long i=0;i<2;i++)
    {
        
        ret=pthread_create(pthid+i,NULL,sigfunc,(void*)i);
        THREAD_ERR_CHECK(ret,"pthread_create");
    }
    ret=pthread_join(pthid[0],NULL);
    THREAD_ERR_CHECK(ret,"pthread_join");
        ret=pthread_join(pthid[1],NULL);
    THREAD_ERR_CHECK(ret,"pthread_join");
    return 0;
}